package edu.ccut.saturn.studio.wfg.dialog;

import edu.ccut.saturn.studio.core.util.eclipse.Messages;

public class RevertCandidate {
	
	public static String revertFromFaceToVO(String cs) {
		if (cs.equals(Messages.getString("RevertCandidate.0")))    //$NON-NLS-1$
			return "1";  
		if (cs.equals(Messages.getString("RevertCandidate.1")))    //$NON-NLS-1$
			return "2";  
		if (cs.equals(Messages.getString("RevertCandidate.OneCollect")))    //$NON-NLS-1$
			return "1";  
		if (cs.equals(Messages.getString("RevertCandidate.AllCollect")))    //$NON-NLS-1$
			return "2";  
		if (cs.equals(Messages.getString("RevertCandidate.LotCollect")))    //$NON-NLS-1$
			return "3";  
		if (cs.equals(Messages.getString("RevertCandidate.SameStep")))     //$NON-NLS-1$
			return "1";  
		if (cs.equals(Messages.getString("RevertCandidate.footStep")))    //$NON-NLS-1$
			return "2";  
		if (cs.equals(Messages.getString("RevertCandidate.OneBrench")))    //$NON-NLS-1$
			return "1";  
		if (cs.equals(Messages.getString("RevertCandidate.AllBrench")))    //$NON-NLS-1$
			return "2";  //$NON-NLS-1$
		if (cs.equals(Messages.getString("RevertCandidate.LotBranch")))    //$NON-NLS-1$
			return "3";  
		if (cs.equals(Messages.getString("RevertCandidate.IsNot")))    //$NON-NLS-1$
			return "-1";  
		if (cs.equals(Messages.getString("RevertCandidate.Yes")))    //$NON-NLS-1$
			return "1";  //$NON-NLS-1$
		if (cs.equals(Messages.getString("RevertCandidate.UnAuto")))    //$NON-NLS-1$
			return "-1";  
		if (cs.equals(Messages.getString("RevertCandidate.Auto")))    //$NON-NLS-1$
			return "1";  
		return null;
	}
	
	public static String revertStartPolicy(String cs) {
		if (cs.equals("1"))  
			return Messages.getString("RevertCandidate.HumenStart");    //$NON-NLS-1$
		if (cs.equals("2"))  
			return Messages.getString("RevertCandidate.EvenStart");    //$NON-NLS-1$
		return "";  
	}

	public static String revertPolymeMode(String cs) {
		if (cs.equals("1"))  
			return Messages.getString("RevertCandidate.OneCollection");    //$NON-NLS-1$
		if (cs.equals("2"))  
			return Messages.getString("RevertCandidate.AllCollection");    //$NON-NLS-1$
		if (cs.equals("3"))  
			return Messages.getString("RevertCandidate.LotCollection");    //$NON-NLS-1$
		return "";  
	}
	
	public static String revertTransferStyle(String cs) {
		if (cs.equals("1"))  
			return (Messages.getString("RevertCandidate.SameStept"));     //$NON-NLS-1$
		if (cs.equals("2"))  
			return (Messages.getString("RevertCandidate.FootStept"));     //$NON-NLS-1$
		return "";  
	}

	public static String revertOffsetModel(String cs) {
		if (cs.equals("1"))  
			return Messages.getString("RevertCandidate.OneBranch");    //$NON-NLS-1$
		if (cs.equals("2"))  
			return Messages.getString("RevertCandidate.AllBranch");    //$NON-NLS-1$
		if (cs.equals("3"))  
			return Messages.getString("RevertCandidate.LotBranch");    //$NON-NLS-1$
		return "";  
	}

	public static String revertAuto(String cs) {
		if (cs.equals("-1"))  
			return Messages.getString("RevertCandidate.UnAuto");    //$NON-NLS-1$
		if (cs.equals("1"))  
			return Messages.getString("RevertCandidate.Auto");    //$NON-NLS-1$
		return "";  
	}
}
